package com.ssy.lingxi.purchase.controller.inner;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.purchase.api.dto.request.RequisitionQuantityDeductReq;
import com.ssy.lingxi.purchase.service.inner.PurchaseInnerService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wyx
 * @version 2.0.0
 * @date 2021-11-08
 */
@RestController
@RequestMapping("/purchase/inner")
public class RequisitionInnerController {
    @Resource
    private PurchaseInnerService purchaseInnerService;

    /**
     * 请购单转请购订单扣减请购数量、增加已转订单数量内部接口
     * @param req 请求参数
     * @return 操作结果
     */
    @RequestMapping(value = "/requisition/quantity/deduct", method = RequestMethod.POST)
    Wrapper<Void> requisitionQuantityDeduct(@RequestBody RequisitionQuantityDeductReq req){
      return purchaseInnerService.requisitionQuantityDeduct(req);
    }
}
